﻿using Appliaction.Dto.Inv;
using Domain.Entitys.Inv;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Appliaction.IAppServices.Inv
{
    public  interface IInv_QtyServices
    {
        /// <summary>
        /// 仓库盘点查询
        /// </summary>
        /// <param name="qty_code"></param>
        /// <param name="qty_type"></param>
        /// <param name="currentPage"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        List<Qty_SelectDto> Inv_Qty_selectFY(string qty_code, string qty_type, int currentPage, int pageSize, string proName);

        /// <summary>
        /// 仓库盘点列表查询
        /// </summary>
        /// <param name="trf_code"></param>
        /// <param name="trf_type"></param>
        /// <returns></returns>
        Task<int> Inv_Qty_selectCount(string qty_code, string qty_type,string proName);

        /// <summary>
        /// 根据编号查询仓库盘点
        /// </summary>
        /// <param name="trf_code"></param>
        /// <returns></returns>
        Task<List<Inv_qty>> Inv_Qty_SelectCode(string qty_code);


        /// <summary>
        /// 根据编码查询仓库盘点详情信息
        /// </summary>
        /// <param name="trf_code"></param>
        /// <returns></returns>
        Task<List<inv_proddti>> Inv_Qty_SelectDetail(string qty_code);

        /// <summary>
        /// 修改盘点审核状态
        /// </summary>
        /// <param name="othwr_code"></param>
        /// <param name="Othwr_audit_by"></param>
        /// <param name="Othwr_audit_time"></param>
        /// <param name="othwr_audit_statua"></param>
        /// <param name="othwr_audit_opinion"></param>
        /// <returns></returns>
        Task<int> Inv_qty_examineUpdate(Inv_QtyUpdateDto  inv_QtyUpdateDto);


        /// <summary>
        /// 删除仓库盘点单
        /// </summary>
        /// <param name="othwr_id"></param>
        /// <returns></returns>
        Task<int> Inv_Qty_delete(int qty_id);




        /// <summary>
        /// 新增仓库盘点单
        /// </summary>
        /// <returns></returns>
        Task<int> Inv_trf_Insert(Inv_QtyAddDto inv_QtyAddDto);



        /// <summary>
        /// 添加明细表-盘点
        /// </summary>
        /// <param name="inv_proddtiList"></param>
        /// <returns></returns>
        Task<int> inv_proddti_Insert(List<Inv_Proddti_AddDto>  inv_proddtiList);




        /// <summary>
        /// 根据单据编号查询库盘点id信息,来添加详细信息
        /// </summary>
        /// <param name="otgwr_code"></param>
        /// <returns></returns>
        Task<int> inv_Qty_id(string Qty_code);


        /// <summary>
        /// 修改库存调拨单和同一时间执行添加修改库存调拨单详情
        /// </summary>
        /// <param name="inv_Othwr"></param>
        /// <returns></returns>
        Task<int> Inv_Qty_Update(Inv_QtyUpdateMerageDto  inv_QtyUpdateMerageDto);



        /// <summary>
        /// 其他入库单查询盘点单
        /// </summary>
        /// <param name="code"></param>
        /// <param name="currentPage"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        List<Inv_qty> Inv_Qty_MainSelect(string code, int currentPage, int pageSize);
        /// <summary>
        /// 其他入库单查询盘点单--其他入库单
        /// </summary>
        /// <param name="code"></param>
        /// <param name="currentPage"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        Task<int> Inv_Qty_MainSelect_Count(string code);

        /// <summary>
        /// 根据编码查询仓库盘点详情信息--其他入库单
        /// </summary>
        /// <param name="trf_code"></param>
        /// <returns></returns>
        Task<List<inv_proddti>> Inv_Qty_SelectMainDetail(string qty_code);
        /// <summary>
        /// 盘亏出库--其他出库单
        /// </summary>
        /// <param name="code"></param>
        /// <param name="currentPage"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        List<Inv_qty> Inv_Qty_Maisbhg_Select(string code, int currentPage, int pageSize);

        /// <summary>
        /// 其他入库单查询盘点单--其他出库单
        /// </summary>
        /// <param name="code"></param>
        /// <param name="currentPage"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        Task<int> Inv_Qty_Maisbhg_Select_Count(string code);

        /// <summary>
        /// 根据编码查询仓库盘点详情信息--其他出库单
        /// </summary>
        /// <param name="trf_code"></param>
        /// <returns></returns>
        Task<List<inv_proddti>> Inv_Qty_SelectMainbhgDetail(string qty_code);




        /// <summary>
        /// 其他入库单审核--回调将盘点明细表进行修改,改变未已经修改
        /// </summary>
        /// <returns></returns>
        Task<int> Inv_Qty_Update_zt(List<Inv__proddtiUpdateztDto>  inv__proddtiUpdateztDtos);

        /// <summary>
        /// 其他出库单审核完毕之后,修改盘点单的qty_store_bhg这个字段为1
        /// </summary>
        /// <param name="code"></param>
        /// <returns></returns>
        Task<int> Inv_qty_update_qty_store_bhg(string code);
    }
}
